package com.xiaozhuai.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AjaxController {

    @RequestMapping("/t1")
    public String test1()
    {
        return "hello";
    }

    @RequestMapping("/a1")
    public String test2(String name)
    {
        System.out.println("action:param=>"+name);
        if ("xiaozhuai".equals(name))
            return "true";
        else{
            return "false";
        }
    }
}
